<?php
  Yii::import('application.extensions.CSVExport.CSVExport');
  $csv = new CSVExport($dataProvider);
  $content = $csv->toCSV();
  Yii::app()->getRequest()->sendFile($filename, $content, "text/csv", false);

  
?>
